1. Field of the Invention
The present invention relates to a mobile communication system, and more particularly to a method and an apparatus for transmitting and receiving data in a Media Access Control (MAC) layer.
2. Description of the Related Art
A UMTS (Universal Mobile Telecommunication Service) system, known as the 3rd Generation mobile communication system, employs a Wideband Code Division Multiple Access (WCDMA) based on General Packet Radio Services (GPRS) and Global System for Mobile Communications (GSM), which are European mobile communication systems. Based on the 3GPP (3rd Generation Partnership Project) standard, the UMTS system can provide a consistent service by which a user of a mobile phone or a computer can transmit packet-based text, digitized voice or video data, or multimedia data at a high speed of at least 2 Mbps wherever the user is located in the world. The UMTS uses a concept of virtual access, that is, a packet exchange-based access using a packet protocol such as an Internet Protocol (IP). The UMTS can always connect to any terminal within its network.
In order to support a High Data Rate (HDR), a High Speed Packet Access (HSPA) system such as 3rd Generation Partnership Project (3GPP) requires performance improvement for a Radio Link Control (RLC) and a Media Access Control (MAC) corresponding to a layer-2 protocol.
The MAC layer is connected to RLC layer entities and/or Packet Data Convergence Protocol (PDCP) layer entities through Logical Channels (LCHs), and generates a Protocol Data Unit (PDU) by multiplexing Service Data Units (SDUs) delivered from the RLC layer entities and then attaching a MAC header to the multiplexed SDUs. Such a PDU output from the MAC layer is called a MAC-PDU.
A MAC header includes information fields relating to the SDUs within the MAC-PDU. Herein, since each of the information fields has a size of one or more bits, the entire size of the MAC header does not correspond to a multiple of 8 bits (one byte) in most instances. In this case, the remaining PDU after removal of the MAC header is in a state in which byte alignment is broken. Therefore, in order to process a PDU with unaligned bytes within a memory, a receiver must perform a bit operation in which the start and end of the PDU are bit-masked and the resultant data is then read. As a result, the bit operation is performed twice for each PDU. Accordingly, the receiver spends excessive processing time over the whole layer-2 stack, which results in unnecessary consumption of Control Processing Unit (CPU) clock and power.
The most widely used solution for avoiding a bit operation during data processing is to perform a memory copy. However, the memory copy in a mobile communication system requiring a high data rate may increase consumption of system resources, which results in reduction of the data rate.